﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using BrokerBase.Lib.Policy;

namespace broker.duty.RB
{
    class Class12
    {
        public void Calc1(IPolicyPeriodActing ppa, IDutyActing da)
        {
            string s = ppa.PolicyActing.Policy.SelectedColRateFactors["领取年龄"];

            int a = int.Parse(s.Substring(0, 2));

            if (ppa.Age >=a && ppa.Age < 80)
            {
                da.Value = ppa.Amount * 0.05;
            }
        }

        public void Calc1(IPolicyPeriodActing ppa, IDutyActing da)
        {
            if (ppa.SchemePeriodActing.InsurantStates.Contains("身故"))
            {
                da.Value = ppa.Amount * 2;
                ppa.IsCurrentFinish = true;
            }
        }

        public void Calc1(IPolicyPeriodActing ppa, IDutyActing da)
        {
            if (ppa.Age==80)
            {
                da.Value = ppa.Amount * 2;
                ppa.IsCurrentFinish = true;
                
            }
        }
    }
}
